import React, {Component} from 'react'
import {
    Text,
    View,
    StyleSheet,
    Button,
    TextInput,
    Image,
    FlatList,
    ScrollView,
    InteractionManager,
    Animated,
    TouchableOpacity, TouchableHighlight, ViewStyle, StyleProp, TextStyle
} from 'react-native'
import {inject, observer} from "mobx-react";
import {IS_IOS} from "../../../../style/constant";
import styles, {statusHeight} from "../../../../style";
import {Store} from "../../../../store";

interface MineNavigationBarProps extends Store{
    navigationBarStyle: ViewStyle,
    title: string,
    renderRightButton: React.ComponentType<any>
}

interface MineNavigationBarState {

}

@inject("config")
@observer
export default class MineNavigationBar extends Component<MineNavigationBarProps, MineNavigationBarState> {

    render() {
        const {navigationBarStyle, title, renderRightButton: RightButton} = this.props;
        return (<View style={[MineNavigationBarStyles.container,{opacity:this.props.config.MineNavBarOpacity}]}>
            {/*{title ? <Text style={[MineNavigationBarStyles.title, {}]}>{title}</Text> : null}*/}
            <RightButton />
        </View>)
    }
}

const MineNavigationBarStyles = StyleSheet.create({
    container: {
        justifyContent: "flex-end",
        flexDirection:"row",
        paddingHorizontal:10,
        paddingBottom: 10,
        paddingTop: statusHeight,
        backgroundColor: "#fff",
        height: 43 + statusHeight
    },
    title: {
        fontSize: 18,
        color: "#000",
        textAlign: "center",
    }
});
